import { HTTP } from '../utils/httpRequestUtil'
import URL from './api'
export default {
  getProcessList (params, cb) {
    HTTP.post(URL.getProcessList, params).then(function (response) {
      cb(response.data)
    }).catch(function (error) {
      cb(error.response)
    })
  },
  updateVisitTime (params, cb) {
    HTTP.post(URL.updateVisitTime, params).then(function (response) {
      cb(response.data)
    }).catch(function (error) {
      cb(error.response)
    })
  },
  functionLoadUseList (params, cb) {
    HTTP.post(URL.functionLoadUse, params).then(function (response) {
      cb(response.data)
    }).catch(function (error) {
      cb(error.response)
    })
  },
  functionSave (params, cb) {
    HTTP.post(URL.functionSave, params).then(function (response) {
      cb(response.data)
    }).catch(function (error) {
      cb(error.response)
    })
  },
  functionLoadAll (params, cb) {
    HTTP.post(URL.functionLoadAll, params).then(function (response) {
      cb(response.data)
    }).catch(function (error) {
      cb(error.response)
    })
  }
}
